package com.ytkj.digitalConstruction.dao.message;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;

import com.github.pagehelper.Page;
import com.ytkj.digitalConstruction.entity.message.Message;
import com.ytkj.digitalConstruction.httpbean.message.resbean.ResMessage;

/**
 * 消息管理Mapper
 * @author iking
 *
 */
@Mapper
public interface MessageMapper {
	int deleteByPrimaryKey(Integer messageId);

	int insert(Message record);

	int insertSelective(Message record);

	Message selectByPrimaryKey(Integer messageId);

	int updateByPrimaryKeySelective(Message record);

	int updateByPrimaryKey(Message record);

	/**
	 * @Title: deleteByIdPrimaryKey 
	 * @Description: 根据id删除消息 
	 * @param messageId 
	 * @return Integer
	 * @throws
	 */
	Integer updateByPrimaryKey(Integer messageId);

	/**
	 *
	 * @Title: selectAll 
	 * @Description: 查询所有未删除设备 
	 * @return Integer 
	 * @throws
	 */
	List<Message> selectAll();

	/**
	 * 分页查询指定用户发送的消息
	 * 
	 * @param userId
	 * @return
	 */
	Page<ResMessage> selectByPublisher(Integer userId);
}